<admintpl file="header"/>

</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:U('indexmy/CityGroup')}">城市列表</a></li>
        <li><a href="{:U('indexmy/addcity')}">添加城市</a></li>
    </ul>
    <form class="well form-search" method="post" action="">
        用户ID：
        <input type="text" name="city_id" style="width: 100px;" value="{:I('request.uid')}" placeholder="请输入城市ID">
        关键字：
        <input type="text" name="keyword" style="width: 200px;" value="{:I('request.keyword')}" placeholder="地区/城市">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:U('Indexmy/CityGroup')}">清空</a>

    </form>
    <form method="post" class="js-ajax-form">
        <input name='uploads[]' type="file" multiple>
        <table class="table table-bordered">
            <thead>
            <tr>
                <th align="center">ID</th>
                <th>地区</th>
                <th>城市</th>
                <th align="center">操作</th>
            </tr>
            </thead>
            <php>
                $user_statuses=array("0"=>L('USER_STATUS_BLOCKED'),"1"=>L('USER_STATUS_ACTIVATED'),"2"=>L('USER_STATUS_UNVERIFIED'));
            </php>
            <foreach name="list" item="vo">
                <tr>
                    <td align="center">{$vo.city_id}</td>
                    <td>{$vo['dq']?$vo['dq']:($vo['mobile']?$vo['mobile']:L('THIRD_PARTY_USER'))}</td>
                    <td>{$vo['city']?$vo['city']:L('NOT_FILLED')}</td>
                    <td>
                        <a href="#" id="btn_sc" style="color: red;" onclick="city_sc('{$vo.city_id}')">删除</a>
                    </td>
                </tr>
            </foreach>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    $('#mess').hide();

    function city_sc(id) {
        $.post("{:U('indexmy/city_sc')}", {'id': id}, function (o) {
            if (o == 111) {
                alert('删除成功！');
                location.href = "{:U('indexmy/CityGroup')}";
            } else {
                console.log('删除失败！');
            }
        });
        return false;
    }

</script>
</body>
